package com.cet.lxf.generic.test02;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-08-02 15:01
 **/
public class Main04 {
    public static void main(String[] args) {
        Pair04<Integer> pair04 = new Pair04<>();

    }

    private static int add(Pair04<? extends Integer> p) {
        Number first = p.getFirst();
        Number last = p.getLast();
//        p.setFirst(Integer.valueOf(1));
        return first.intValue() + last.intValue();
    }
}

class Pair04<T>{
    private T first;
    private T last;

    public Pair04(T first, T last) {
        this.first = first;
        this.last = last;
    }

    public Pair04() {
    }

    public T getFirst() {
        return first;
    }

    public void setFirst(T first) {
        this.first = first;
    }

    public T getLast() {
        return last;
    }

    public void setLast(T last) {
        this.last = last;
    }
}
